function [act logact] = gaussBayesVerbeek(m, b, W, v, ElndetLambda, Y, C)


[N D] = size(Y);

centered_Y = Y - repmat(m, N, 1);
exp_dist2 = D/b + v*sum(centered_Y*W.*centered_Y, 2);

logact = - D*log(2*pi) + ElndetLambda - exp_dist2;
logact = logact - v*(reshape(C, D*D, N)'*W(:));
logact = logact*0.5;

act = exp(logact);
